﻿<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <title>下馆子商户登录</title>
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link href="login_files/login.css" rel="stylesheet" type="text/css">
    <style>
        body {
            background: url(http://dfb365-qd.oss-cn-qingdao.aliyuncs.com//resources/img/login_bg.jpg) no-repeat center center;
            background-size: cover;
        }
    </style>
</head>
<body>
    <div class="page">
        <div class="box">
            <div class="login_box">
                <form id="form">
                    <h2>下馆子商户管理</h2>
                    <div class="form_line">
                        <label for="username">
                            账号：</label><input name="mobile" class="ipt" id="username" type="text" maxlength="20">
                    </div>
                    <div class="form_line">
                        <label for="password">
                            密码：</label><input name="password" class="ipt" id="password" type="password" maxlength="20">
                    </div>
                    <div class="form_line">
                        <input class="btn" type="submit" value="登录">
                    </div>
                    <div class="form_line">
                        <div class="tip" id="tip">
                            &nbsp;&nbsp;&nbsp;
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <script src="login_files/jquery-1.7.2.min.js"></script>

    <script>
        $(function () {
            $('.ipt').focusin(function () {
                $(this).addClass('focus');
                $('#tip').text('').hide();
            });
            $('.ipt').focusout(function () {
                $(this).removeClass('focus');
                $('#tip').text('').hide();
            });

            $('.btn').hover(function () {
                $(this).addClass('hover');
            }, function () {
                $(this).removeClass('hover');
            });
            $('#form').submit(function () {
                if ($.trim($('#username').val()) == '') {
                    $('#tip').text('请输入账号').show();
                    return false;
                }
                if ($.trim($('#password').val()) == '') {
                    $('#tip').text('请输入密码').show();
                    return false;
                }
                $('#tip').text('').hide();
            })
        });
</script>
</body>
</html>
